package com.aqadoos.webservice;

import com.aqadoos.domain.User;
import com.aqadoos.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.jws.WebService;
import java.util.List;

/**
 * User: Ata-ul.Qadoos
 */
@WebService(endpointInterface = "com.aqadoos.webservice.UserWebService")
public class UserWebServiceImpl implements UserWebService {

    @Autowired
    UserService userService;

    public Long create(User user) {
        return userService.create(user);
    }

    public User findByUserId(String userId) {
        return userService.findByUserId(userId);
    }

    public List<User> findAll() {
        return userService.findAll();
    }
}
